package cn.edu.hunau.oop.day03.shape;

/**
 *
 * 描述平面的中的形状
 * @author hb
 * @date 2025-08-05 16:51:17
 */
public class Shape {
    //描述定位的点
    private Point position;

    public Shape() {

    }

    public Shape(Point position) {
        this.position = position;
    }

    public Shape(int x,int y) {
       this(new Point(x,y));
    }

    public double area(){
        return -1;
    }

    public boolean container(Point p){
        return false;
    }

    public boolean container(int x,int y){
        return this.container(new Point(x,y));
    }

    public Point getPosition() {
        return position;
    }

    public void setPosition(Point position) {
        this.position = position;
    }
}
